package map;

import java.io.*;

//21016 24247 24179
public class Test {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
       Person p=new Person("孙悟空",18,"男","花果山");
        FileOutputStream fos=new FileOutputStream("Person.obj");
        ObjectOutputStream oos=new ObjectOutputStream(fos);//对象输出流
        oos.writeObject(p);
        oos.close();
        FileInputStream fis=new FileInputStream("Person.obj");
        ObjectInputStream ois=new ObjectInputStream(fis);
        Object obj=ois.readObject();
        System.out.println(obj);
        ois.close();
        String line = "让我再看你一遍，从南到北。";

    }
}
